{% extends "base.html" %}

{% block titulo %}Videos{% endblock %}

{%block breadcrumbs%}<div id="middleBreadcrumb">
                            <a href="/home/">home</a> >
                       </div>
                       <div id="middleBreadcrumb">
                            <a href="/course/{{course.code}}/{{group.code}}/">{{course.name}}</a> >
                       </div>
                       <div id="lastBreadcrumb">
                           Videos
                       </div>

{%endblock%}

{%block style%}
<link rel="stylesheet" type="text/css" href="/stylesheets/viewVideoStyle.css" />
{%endblock%}


{%block cuerpo%}

{% if lstVideos %}
    {%if isTeacher%}
        <div id="videoMenuInfo">&iquest;Desea <a href="/uploadVideo/{{course.code}}/{{group.code}}/">subir otro video</a>?</div>
        <br />
    {%endif%}
<table>
{% for videos in lstVideos %}
    <tr>
    <!-- Video 1 -->
    <td width="350" class="{%cycle 'darker' 'lighter' %}">
    <div id="menu_title">{{videos.0.0}}</div>
    <br />
    <a href="/viewVideo/{{course.code}}/{{group.code}}/{{videos.0.2}}/"><img src="/videos/thumbnails/{{videos.0.3}}" border="0" width="320" height="240"></img></a>
    <br />
    <div id="menu_description">{{videos.0.1}}</div>
    <br />
    (<a href="/viewVideo/{{course.code}}/{{group.code}}/{{videos.0.2}}/">Ver video</a>{%if not videos.0.5%} | <a href="/videos/{{videos.0.2}}">Descargar</a>{%if videos.0.4%} | <a href="/files/{{videos.0.4}}">Descargar Avi</a>{%endif%}{%endif%} |
        {%if isTeacher%}<a href="/deleteVideo/{{videos.0.6}}/{{course.code}}/{{group.code}}/">Eliminar</a>{%endif%})
    </td>
    
    <!-- Video 2 -->
    <td width="350" class="{%cycle 'lighter' 'darker' %}">
    {% if videos.1 %}
    
    <div id="menu_title">{{videos.1.0}}</div>
    <br />
    <a href="/viewVideo/{{course.code}}/{{group.code}}/{{videos.1.2}}/"><img src="/videos/thumbnails/{{videos.1.3}}" border="0" width="320" height="240"></img></a>
    <br />
    <div id="menu_description">{{videos.1.1}}</div>
    <br />
    (<a href="/viewVideo/{{course.code}}/{{group.code}}/{{videos.1.2}}/">Ver video</a>{%if not videos.1.5%} | <a href="/videos/{{videos.1.2}}">Descargar</a>{%if videos.0.4%} | <a href="/files/{{videos.1.4}}">Descargar Avi</a>{%endif%}{%endif%} |
    
    {%if isTeacher%}<a href="/deleteVideo/{{videos.0.6}}/{{course.code}}/{{group.code}}/">Eliminar</a>{%endif%})
    

    {%endif%}
    </td>
    </tr>
{% endfor %}
</table>
{%else %}

    <div id="videoMenuInfo">No hay videos disponibles para este grupo.
    {%if isTeacher%}
        &iquest;Desea <a href="/uploadVideo/{{course.code}}/{{group.code}}/">subir un video</a>?
        <br />
    {%endif%}
    </div>
{%endif%}
{% endblock %}
